Skip to content

Re-roll #52: Klima category (11 topics) - #67

Merged
rastermanden merged 5 commits into
mainfrom
claude/reroll-52-klima
May 13, 2026
Merged

Re-roll #52: Klima category (11 topics)#67
rastermanden merged 5 commits into
mainfrom
claude/reroll-52-klima

Conversation

@rastermanden

Copy link
Copy Markdown
Owner

Summary

Re-rolls #52 onto the per-category content structure introduced in #61 (claude/per-category-content-modules).

  • Preserves Copilot's 11 topic files verbatim under content/geografi/klima/ (no demos).
  • New category file at content/geografi/categories/klima.ts mirroring the shape of regioner.ts / demografi.ts.
  • Registers klima in content/geografi/index.ts alongside regioner and demografi.
  • Does NOT touch app/[subject]/[category]/[topic]/page.tsx — the new structure has no central demo registry.
  • Does NOT modify README.md (left for a separate follow-up).

Topics added (Copilot's order)

  1. vejr-vs-klima (vejrVsKlima)
  2. klimaets-elementer (klimaetsElementer)
  3. atmosfaerens-opbygning (atmosfaerensOpbygning)
  4. globale-vindsystemer (globaleVindsystemer)
  5. klimazoner (klimazoner)
  6. koeppens-klimaklassifikation (koeppensKlimaklassifikation)
  7. havstroemme (havstroemme)
  8. drivhuseffekten (drivhuseffekten)
  9. klimaforandringer (klimaforandringer)
  10. klimatilpasning (klimatilpasning)
  11. el-nino-la-nina (elNinoLaNina)

Build status

npm run build succeeds, generating 176/176 static pages (includes 11 new topic pages and 11 new quiz pages under /geografi/klima/..., plus legacy redirect routes).

npx tsc --noEmit clean apart from the pre-existing lib/maal-og-enheder.test.ts(11,8): error TS5097.

Note on diff

Until #61 lands, the diff against main also contains #61's changes. Once #61 merges, only the new content files plus the small content/geografi/index.ts update will remain.

Supersedes #52 (close once merged).


Generated by Claude Code

claude added 3 commits May 13, 2026 14:34
Topic PRs all converged on the same three central files
(content/<subject>/index.ts, app/[subject]/[category]/[topic]/page.tsx,
README.md), so any two open topic PRs were guaranteed to conflict.
This refactor splits the registries so each PR only touches files it
owns.

Per-category content modules
- Add content/<subject>/categories/<category>.ts files that import
  their own topics and export the Category object.
- Slim content/matematik/index.ts and content/geografi/index.ts to
  just compose the category list. They only change when a brand-new
  category is added.
- Adding a topic to an existing category now touches a single shared
  file (its category file) instead of the subject index.

Per-topic demo components
- Replace the string-keyed demoKey field on Topic with an optional
  demoComponent: ComponentType reference.
- Each topic file imports its own demo component and sets it on the
  Topic object.
- Remove the central TOPIC_DEMO_COMPONENTS record in
  app/[subject]/[category]/[topic]/page.tsx; the page reads
  topic.demoComponent directly. Topic PRs no longer touch the page
  file at all.

Docs
- Document the new "adding a topic" workflow in AGENTS.md so future
  topic PRs land in the per-category file and the per-topic demo
  field, keeping the shared surface minimal.

Build still produces 131/131 static routes.
Resolve conflict on content/geografi/index.ts caused by #61 squash-
merge. Kept klima category import + array entry.
@rastermanden
rastermanden marked this pull request as ready for review May 13, 2026 15:20
claude added 2 commits May 13, 2026 15:23
Re-resolve content/geografi/index.ts after #65 (pladetektonik) merged.
Final categories: [pladetektonik, regioner, demografi, klima].
Re-resolve content/geografi/index.ts after #66 (geopolitik) merged.
Final categories: [pladetektonik, regioner, demografi, geopolitik, klima].
@rastermanden
rastermanden merged commit 4e748ac into main May 13, 2026
rastermanden pushed a commit that referenced this pull request May 13, 2026
Re-resolve content/geografi/index.ts after #67 (klima) merged.
Final categories: [naturgeografi, pladetektonik, regioner, demografi, geopolitik, klima].
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants